define(
["render/sprite/Sprite"],
function(Sprite) {
	return {
		create: function() {
			var _self = {
				init: function(systemMgr, texUrl, x, y) {
					_sprite = Sprite.create().init(systemMgr, texUrl);
					_sprite.getTransform().pos[0] = x;
					_sprite.getTransform().pos[1] = y;
					_sprite.getTransform().update();

					return _self;
				},

				update: function(cam) {
					//Get degree
					var deg = Math.atan2(cam.forward[2], cam.forward[0]);

					//Rotate sprite
					var transform = _sprite.getTransform();
					transform.rot[2] = deg;
					transform.update();
				},

				draw: function() {
					_sprite.draw();
				},

				destroy: function() {
					_sprite.destroy();
				}
			};

			var _sprite;

			return _self;
		}
	}
});